package com.paranoid.flashcard.logic;

import android.graphics.Bitmap;

import com.paranoid.flashcard.model.Card;
import com.paranoid.flashcard.model.Card.Side;

public class FlashCardViewModel {
	private Card mCard;
	private Side mSideUp;
	
	public FlashCardViewModel(Card card, Side sideUp) {
		this.mCard = card;
		this.mSideUp = sideUp;
	}
	
	public String getSideUp() {
		if (mSideUp == Side.A)
			return mCard.getTerm();
		else
			return mCard.getDefinition();
	}
	
	public String getSideDown() {
		if (mSideUp == Side.A)
			return mCard.getDefinition();
		else
			return mCard.getTerm();
	}
	
	public int getMasteryLevel() {
		return mCard.getMasteryLevel();
	}
	
	// TODO: this isn't necessary anymore, rework the whole card model to match Quizlet's 
	public Bitmap getImageUp() {
      return mCard.getImage();
//		if (mSideUp == Side.A)
//			return mCard.getImageA();
//		else
//			return mCard.getImageB();
	}

    // TODO: this isn't necessary anymore, rework the whole card model to match Quizlet's 
	public Bitmap getImageDown() {
	      return null;
//		if (mSideUp == Side.A)
//			return mCard.getImageB();
//		else
//			return mCard.getImageA();
	}
}
